package com.lei.ucenter.util;

import org.springframework.security.crypto.bcrypt.BCrypt;

/**
 * Created by IntelliJ
 * Author:熊磊
 */
public class BCryptUtil {
    public static String encodePassword(String password){
        return BCrypt.hashpw(password,BCrypt.gensalt());
    }
    public static boolean match(String password,String encodePassword){
        return BCrypt.checkpw(password,encodePassword);
    }
}
